import request from '@/utils/request'

// 查询专项任务计划检查项列表
export function listGovernCheckTaskPlanItem(query) {
  return request({
    url: '/check/governCheckTaskPlanItem/list',
    method: 'get',
    params: query
  })
}

// 查询专项任务计划检查项列表
export function listUserSelfTaskPlanItem(query) {
  return request({
    url: '/check/governCheckTaskPlanItem/userSelf/list',
    method: 'get',
    params: query
  })
}

// 查询专项任务计划检查项详细
export function getGovernCheckTaskPlanItem(id) {
  return request({
    url: '/check/governCheckTaskPlanItem/' + id,
    method: 'get'
  })
}

// 新增专项任务计划检查项
export function addGovernCheckTaskPlanItem(data) {
  return request({
    url: '/check/governCheckTaskPlanItem',
    method: 'post',
    data: data
  })
}

// 修改专项任务计划检查项
export function updateGovernCheckTaskPlanItem(data) {
  return request({
    url: '/check/governCheckTaskPlanItem',
    method: 'put',
    data: data
  })
}

// 批量分配检查人员
export function batchUpdate(data) {
  return request({
    url: '/check/governCheckTaskPlanItem/batchUpdate',
    method: 'post',
    data: data
  })
}

// 重置分配检查人员
export function resetCheckUser(id) {
  return request({
    url: '/check/governCheckTaskPlanItem/resetCheckUser/' + id,
    method: 'post',
  })
}


// 删除专项任务计划检查项
export function delGovernCheckTaskPlanItem(id) {
  return request({
    url: '/check/governCheckTaskPlanItem/' + id,
    method: 'delete'
  })
}

export function importUser(params) {
  return request({
    url: '/check/governCheckTaskPlanItem/importData',
    method: 'post',
    data: params
  })
}

export function exportUser(governTaskPlanId) {
  return request({
    url: '/check/governCheckTaskPlanItem/export/' + governTaskPlanId,
    method: 'get'
  })
}

// 新增专项任务计划检查项
export function addPlanItem(data) {
  return request({
    url: '/check/governCheckTaskPlanItem/addPlanItems',
    method: 'post',
    data: data
  })
}
